
use "Study 3 Britain.dta"

recode ran_text (1=1) (2=0), into(treatment)


* Weakening Norms   

**********************
*      Figure 5      *
**********************

histogram them if (politics_scale_profile_update<3 | politics_scale_profile_update>5), by(treatment, note("N = 1070") xrescale row(1)) subtitle(, fcolor(ltblue*0.2)) bfcolor(ltblue) blcolor(blue*0.5) bin(4) percent kdensity kdenopts(lcolor(%40) lpattern(solid) width(27) gaussian) ylabel(0(20)70) by(, title("Strong Identifiers")) by(, legend(off)) xtitle("Voted to Give (£)") ytitle("Percent of Respondents") yline(20 40 60)
graph save Graph "Figure 5c.gph"

histogram them if (politics_scale_profile_update==3 | politics_scale_profile_update==5), by(treatment, note("N = 1115") xrescale row(1)) subtitle(, fcolor(ltblue*0.2)) bfcolor(ltblue) blcolor(blue*0.5) bin(4) percent kdensity kdenopts(lcolor(%40) lpattern(solid) width(27) gaussian) ylabel(0(20)70) by(, title("Weak Identifiers")) by(, legend(off)) xtitle("Voted to Give (£)") ytitle("Percent of Respondents") yline(20 40 60)
graph save Graph "Figure 5b.gph"

histogram them, by(treatment, note("N = 2185") xrescale row(1)) subtitle(, fcolor(ltblue*0.2)) bfcolor(ltblue) blcolor(blue*0.5) bin(4) percent kdensity kdenopts(lcolor(%40) lpattern(solid) width(27) gaussian) ylabel(0(20)70) by(, title("Weak and Strong Identifiers")) by(, legend(off)) xtitle("Voted to Give (£)") ytitle("Percent of Respondents") yline(20 40 60)
graph save Graph "Figure 5a.gph"

ttest them if (politics_scale_profile_update==3 | politics_scale_profile_update==5), by(treatment)

ttest  them if (politics_scale_profile_update<3 | politics_scale_profile_update>5), by(treatment)

ttest them, by(treatment)


permtest2 them if (politics_scale_profile_update==3 | politics_scale_profile_update==5), by(treatment)

permtest2  them if (politics_scale_profile_update<3 | politics_scale_profile_update>5), by(treatment)

permtest2 them, by(treatment)

**********************
*     Appendix 7     *
**********************

logit treatment age profile_gender ib7.politics_scale_profile_update 
test age profile_gender 1.politics_scale_profile_update 2.politics_scale_profile_update 3.politics_scale_profile_update 5.politics_scale_profile_update 6.politics_scale_profile_update
coefplot, drop(_cons) xline(0) 
graph save Graph "Figure 7c.gph"


**********************
*     Appendix 9     *
**********************

recode them (300=1) (0/299 = 0), gen(d300)
prtest d300 if (politics_scale_profile_update==3 | politics_scale_profile_update==5), by(treatment) 
prtest d300 if   (politics_scale_profile_update<3 | politics_scale_profile_update>5), by(treatment) 

recode them (0=1) (1/300 = 0), gen(d0)
prtest d0 if (politics_scale_profile_update==3 | politics_scale_profile_update==5), by(treatment) 
prtest d0 if  (politics_scale_profile_update<3 | politics_scale_profile_update>5), by(treatment) 
